Integrand size = 21, antiderivative size = 387 \[ \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx=\frac {\left (a^2+20 b^2\right ) x}{2 a^6}-\frac {b^3 \left (40 a^6-84 a^4 b^2+69 a^2 b^4-20 b^6\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^6 (a-b)^{7/2} (a+b)^{7/2} d}-\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{6 a^5 \left (a^2-b^2\right )^3 d}+\frac {\left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \cos (c+d x) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^3 d}+\frac {b^2 \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {5 b^2 \left (2 a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))} \]
1/2*(a^2+20*b^2)*x/a^6-b^3*(40*a^6-84*a^4*b^2+69*a^2*b^4-20*b^6)*arctanh(( a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/a^6/(a-b)^(7/2)/(a+b)^(7/2)/d-1 /6*b*(24*a^6-146*a^4*b^2+167*a^2*b^4-60*b^6)*sin(d*x+c)/a^5/(a^2-b^2)^3/d+ 1/2*(a^6-23*a^4*b^2+27*a^2*b^4-10*b^6)*cos(d*x+c)*sin(d*x+c)/a^4/(a^2-b^2) ^3/d+1/3*b^2*cos(d*x+c)*sin(d*x+c)/a/(a^2-b^2)/d/(a+b*sec(d*x+c))^3+5/6*b^ 2*(2*a^2-b^2)*cos(d*x+c)*sin(d*x+c)/a^2/(a^2-b^2)^2/d/(a+b*sec(d*x+c))^2+1 /6*b^2*(48*a^4-53*a^2*b^2+20*b^4)*cos(d*x+c)*sin(d*x+c)/a^3/(a^2-b^2)^3/d/ (a+b*sec(d*x+c))
Time = 5.74 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.68 \[ \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx=\frac {6 \left (a^2+20 b^2\right ) (c+d x)-\frac {12 b^3 \left (-40 a^6+84 a^4 b^2-69 a^2 b^4+20 b^6\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{7/2}}-48 a b \sin (c+d x)+\frac {4 a b^6 \sin (c+d x)}{(a-b) (a+b) (b+a \cos (c+d x))^3}+\frac {2 a b^5 \left (-18 a^2+13 b^2\right ) \sin (c+d x)}{(a-b)^2 (a+b)^2 (b+a \cos (c+d x))^2}+\frac {2 a b^4 \left (90 a^4-122 a^2 b^2+47 b^4\right ) \sin (c+d x)}{(a-b)^3 (a+b)^3 (b+a \cos (c+d x))}+3 a^2 \sin (2 (c+d x))}{12 a^6 d} \]
(6*(a^2 + 20*b^2)*(c + d*x) - (12*b^3*(-40*a^6 + 84*a^4*b^2 - 69*a^2*b^4 + 20*b^6)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2 - b^2) ^(7/2) - 48*a*b*Sin[c + d*x] + (4*a*b^6*Sin[c + d*x])/((a - b)*(a + b)*(b + a*Cos[c + d*x])^3) + (2*a*b^5*(-18*a^2 + 13*b^2)*Sin[c + d*x])/((a - b)^ 2*(a + b)^2*(b + a*Cos[c + d*x])^2) + (2*a*b^4*(90*a^4 - 122*a^2*b^2 + 47* b^4)*Sin[c + d*x])/((a - b)^3*(a + b)^3*(b + a*Cos[c + d*x])) + 3*a^2*Sin[ 2*(c + d*x)])/(12*a^6*d)
Time = 3.00 (sec) , antiderivative size = 431, normalized size of antiderivative = 1.11, number of steps used = 23, number of rules used = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.048, Rules used = {3042, 4334, 25, 3042, 4588, 25, 3042, 4588, 25, 3042, 4592, 27, 3042, 4592, 27, 3042, 4407, 3042, 4318, 3042, 3138, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^4}dx\) |
\(\Big \downarrow \) 4334 |
\(\displaystyle \frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\int -\frac {\cos ^2(c+d x) \left (3 a^2-3 b \sec (c+d x) a-5 b^2+4 b^2 \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3}dx}{3 a \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\cos ^2(c+d x) \left (3 a^2-3 b \sec (c+d x) a-5 b^2+4 b^2 \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3}dx}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {3 a^2-3 b \csc \left (c+d x+\frac {\pi }{2}\right ) a-5 b^2+4 b^2 \csc \left (c+d x+\frac {\pi }{2}\right )^2}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4588 |
\(\displaystyle \frac {\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\int -\frac {\cos ^2(c+d x) \left (15 b^2 \left (2 a^2-b^2\right ) \sec ^2(c+d x)-2 a b \left (6 a^2-b^2\right ) \sec (c+d x)+2 \left (3 a^4-18 b^2 a^2+10 b^4\right )\right )}{(a+b \sec (c+d x))^2}dx}{2 a \left (a^2-b^2\right )}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {\cos ^2(c+d x) \left (15 b^2 \left (2 a^2-b^2\right ) \sec ^2(c+d x)-2 a b \left (6 a^2-b^2\right ) \sec (c+d x)+2 \left (3 a^4-18 b^2 a^2+10 b^4\right )\right )}{(a+b \sec (c+d x))^2}dx}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {15 b^2 \left (2 a^2-b^2\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2-2 a b \left (6 a^2-b^2\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+2 \left (3 a^4-18 b^2 a^2+10 b^4\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4588 |
\(\displaystyle \frac {\frac {\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}-\frac {\int -\frac {\cos ^2(c+d x) \left (2 b^2 \left (48 a^4-53 b^2 a^2+20 b^4\right ) \sec ^2(c+d x)-a b \left (18 a^4-8 b^2 a^2+5 b^4\right ) \sec (c+d x)+6 \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right )\right )}{a+b \sec (c+d x)}dx}{a \left (a^2-b^2\right )}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\cos ^2(c+d x) \left (2 b^2 \left (48 a^4-53 b^2 a^2+20 b^4\right ) \sec ^2(c+d x)-a b \left (18 a^4-8 b^2 a^2+5 b^4\right ) \sec (c+d x)+6 \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right )\right )}{a+b \sec (c+d x)}dx}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {2 b^2 \left (48 a^4-53 b^2 a^2+20 b^4\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2-a b \left (18 a^4-8 b^2 a^2+5 b^4\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+6 \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )}dx}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4592 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\int \frac {2 \cos (c+d x) \left (-3 b \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right ) \sec ^2(c+d x)-a \left (3 a^6+27 b^2 a^4-25 b^4 a^2+10 b^6\right ) \sec (c+d x)+b \left (24 a^6-146 b^2 a^4+167 b^4 a^2-60 b^6\right )\right )}{a+b \sec (c+d x)}dx}{2 a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\int \frac {\cos (c+d x) \left (-3 b \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right ) \sec ^2(c+d x)-a \left (3 a^6+27 b^2 a^4-25 b^4 a^2+10 b^6\right ) \sec (c+d x)+b \left (24 a^6-146 b^2 a^4+167 b^4 a^2-60 b^6\right )\right )}{a+b \sec (c+d x)}dx}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\int \frac {-3 b \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2-a \left (3 a^6+27 b^2 a^4-25 b^4 a^2+10 b^6\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+b \left (24 a^6-146 b^2 a^4+167 b^4 a^2-60 b^6\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )}dx}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4592 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {\int \frac {3 \left (\left (a^2+20 b^2\right ) \left (a^2-b^2\right )^3+a b \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right ) \sec (c+d x)\right )}{a+b \sec (c+d x)}dx}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \int \frac {\left (a^2+20 b^2\right ) \left (a^2-b^2\right )^3+a b \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right ) \sec (c+d x)}{a+b \sec (c+d x)}dx}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \int \frac {\left (a^2+20 b^2\right ) \left (a^2-b^2\right )^3+a b \left (a^6-23 b^2 a^4+27 b^4 a^2-10 b^6\right ) \csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4407 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \left (\frac {x \left (a^2-b^2\right )^3 \left (a^2+20 b^2\right )}{a}-\frac {b^3 \left (40 a^6-84 a^4 b^2+69 a^2 b^4-20 b^6\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{a}\right )}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \left (\frac {x \left (a^2-b^2\right )^3 \left (a^2+20 b^2\right )}{a}-\frac {b^3 \left (40 a^6-84 a^4 b^2+69 a^2 b^4-20 b^6\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a}\right )}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \left (\frac {x \left (a^2-b^2\right )^3 \left (a^2+20 b^2\right )}{a}-\frac {b^2 \left (40 a^6-84 a^4 b^2+69 a^2 b^4-20 b^6\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{a}\right )}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \left (\frac {x \left (a^2-b^2\right )^3 \left (a^2+20 b^2\right )}{a}-\frac {b^2 \left (40 a^6-84 a^4 b^2+69 a^2 b^4-20 b^6\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{a}\right )}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \left (\frac {x \left (a^2-b^2\right )^3 \left (a^2+20 b^2\right )}{a}-\frac {2 b^2 \left (40 a^6-84 a^4 b^2+69 a^2 b^4-20 b^6\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{a d}\right )}{a}}{a}}{a \left (a^2-b^2\right )}+\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 a \left (a^2-b^2\right )}+\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 a \left (a^2-b^2\right )}+\frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {b^2 \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}+\frac {\frac {5 b^2 \left (2 a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}+\frac {\frac {b^2 \left (48 a^4-53 a^2 b^2+20 b^4\right ) \sin (c+d x) \cos (c+d x)}{a d \left (a^2-b^2\right ) (a+b \sec (c+d x))}+\frac {\frac {3 \left (a^6-23 a^4 b^2+27 a^2 b^4-10 b^6\right ) \sin (c+d x) \cos (c+d x)}{a d}-\frac {\frac {b \left (24 a^6-146 a^4 b^2+167 a^2 b^4-60 b^6\right ) \sin (c+d x)}{a d}-\frac {3 \left (\frac {x \left (a^2-b^2\right )^3 \left (a^2+20 b^2\right )}{a}-\frac {2 b^3 \left (40 a^6-84 a^4 b^2+69 a^2 b^4-20 b^6\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}}\right )}{a}}{a}}{a \left (a^2-b^2\right )}}{2 a \left (a^2-b^2\right )}}{3 a \left (a^2-b^2\right )}\) |
(b^2*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + ((5*b^2*(2*a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x])/(2*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((b^2*(48*a^4 - 53*a^2*b^2 + 20*b^4)*Cos[c + d*x]*S in[c + d*x])/(a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])) + ((3*(a^6 - 23*a^4*b^ 2 + 27*a^2*b^4 - 10*b^6)*Cos[c + d*x]*Sin[c + d*x])/(a*d) - ((-3*(((a^2 - b^2)^3*(a^2 + 20*b^2)*x)/a - (2*b^3*(40*a^6 - 84*a^4*b^2 + 69*a^2*b^4 - 20 *b^6)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a*Sqrt[a - b]* Sqrt[a + b]*d)))/a + (b*(24*a^6 - 146*a^4*b^2 + 167*a^2*b^4 - 60*b^6)*Sin[ c + d*x])/(a*d))/a)/(a*(a^2 - b^2)))/(2*a*(a^2 - b^2)))/(3*a*(a^2 - b^2))
3.6.22.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[b^2*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)* ((d*Csc[e + f*x])^n/(a*f*(m + 1)*(a^2 - b^2))), x] + Simp[1/(a*(m + 1)*(a^2 - b^2)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*(a^2*(m + 1) - b^2*(m + n + 1) - a*b*(m + 1)*Csc[e + f*x] + b^2*(m + n + 2)*Csc[e + f*x ]^2), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegersQ[2*m, 2*n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[c*(x/a), x] - Simp[(b*c - a*d)/a Int[Csc[e + f* x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[(A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*(a + b*Csc [e + f*x])^(m + 1)*((d*Csc[e + f*x])^n/(a*f*(m + 1)*(a^2 - b^2))), x] + Sim p[1/(a*(m + 1)*(a^2 - b^2)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f *x])^n*Simp[a*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C)*(m + n + 1) - a*(A*b - a*B + b*C)*(m + 1)*Csc[e + f*x] + (A*b^2 - a*b*B + a^2*C)*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x ] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && !(ILtQ[m + 1/2, 0] && ILtQ[n, 0])
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d *Csc[e + f*x])^n/(a*f*n)), x] + Simp[1/(a*d*n) Int[(a + b*Csc[e + f*x])^m *(d*Csc[e + f*x])^(n + 1)*Simp[a*B*n - A*b*(m + n + 1) + a*(A + A*n + C*n)* Csc[e + f*x] + A*b*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d , e, f, A, B, C, m}, x] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]
Time = 2.14 (sec) , antiderivative size = 439, normalized size of antiderivative = 1.13
method | result | size |
derivativedivides | \(\frac {\frac {\frac {2 \left (\left (-\frac {1}{2} a^{2}-4 a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (\frac {1}{2} a^{2}-4 a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\left (a^{2}+20 b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{6}}+\frac {2 b^{3} \left (\frac {-\frac {\left (30 a^{4}+6 a^{3} b -34 a^{2} b^{2}-3 a \,b^{3}+12 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {2 \left (45 a^{4}-53 a^{2} b^{2}+18 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (30 a^{4}-6 a^{3} b -34 a^{2} b^{2}+3 a \,b^{3}+12 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}-\frac {\left (40 a^{6}-84 a^{4} b^{2}+69 a^{2} b^{4}-20 b^{6}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{6}}}{d}\) | \(439\) |
default | \(\frac {\frac {\frac {2 \left (\left (-\frac {1}{2} a^{2}-4 a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (\frac {1}{2} a^{2}-4 a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+\left (a^{2}+20 b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{6}}+\frac {2 b^{3} \left (\frac {-\frac {\left (30 a^{4}+6 a^{3} b -34 a^{2} b^{2}-3 a \,b^{3}+12 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {2 \left (45 a^{4}-53 a^{2} b^{2}+18 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (30 a^{4}-6 a^{3} b -34 a^{2} b^{2}+3 a \,b^{3}+12 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}-\frac {\left (40 a^{6}-84 a^{4} b^{2}+69 a^{2} b^{4}-20 b^{6}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{6}}}{d}\) | \(439\) |
risch | \(\text {Expression too large to display}\) | \(1140\) |
1/d*(2/a^6*(((-1/2*a^2-4*a*b)*tan(1/2*d*x+1/2*c)^3+(1/2*a^2-4*a*b)*tan(1/2 *d*x+1/2*c))/(1+tan(1/2*d*x+1/2*c)^2)^2+1/2*(a^2+20*b^2)*arctan(tan(1/2*d* x+1/2*c)))+2*b^3/a^6*((-1/2*(30*a^4+6*a^3*b-34*a^2*b^2-3*a*b^3+12*b^4)*a*b /(a-b)/(a^3+3*a^2*b+3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5+2/3*(45*a^4-53*a^2*b ^2+18*b^4)*a*b/(a^2+2*a*b+b^2)/(a^2-2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3-1/2*(3 0*a^4-6*a^3*b-34*a^2*b^2+3*a*b^3+12*b^4)*a*b/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^ 3)*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b) ^3-1/2*(40*a^6-84*a^4*b^2+69*a^2*b^4-20*b^6)/(a^6-3*a^4*b^2+3*a^2*b^4-b^6) /((a-b)*(a+b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a-b)*(a+b))^(1/2)) ))
Leaf count of result is larger than twice the leaf count of optimal. 855 vs. \(2 (366) = 732\).
Time = 0.45 (sec) , antiderivative size = 1767, normalized size of antiderivative = 4.57 \[ \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx=\text {Too large to display} \]
[1/12*(6*(a^13 + 16*a^11*b^2 - 74*a^9*b^4 + 116*a^7*b^6 - 79*a^5*b^8 + 20* a^3*b^10)*d*x*cos(d*x + c)^3 + 18*(a^12*b + 16*a^10*b^3 - 74*a^8*b^5 + 116 *a^6*b^7 - 79*a^4*b^9 + 20*a^2*b^11)*d*x*cos(d*x + c)^2 + 18*(a^11*b^2 + 1 6*a^9*b^4 - 74*a^7*b^6 + 116*a^5*b^8 - 79*a^3*b^10 + 20*a*b^12)*d*x*cos(d* x + c) + 6*(a^10*b^3 + 16*a^8*b^5 - 74*a^6*b^7 + 116*a^4*b^9 - 79*a^2*b^11 + 20*b^13)*d*x + 3*(40*a^6*b^6 - 84*a^4*b^8 + 69*a^2*b^10 - 20*b^12 + (40 *a^9*b^3 - 84*a^7*b^5 + 69*a^5*b^7 - 20*a^3*b^9)*cos(d*x + c)^3 + 3*(40*a^ 8*b^4 - 84*a^6*b^6 + 69*a^4*b^8 - 20*a^2*b^10)*cos(d*x + c)^2 + 3*(40*a^7* b^5 - 84*a^5*b^7 + 69*a^3*b^9 - 20*a*b^11)*cos(d*x + c))*sqrt(a^2 - b^2)*l og((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)* (b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a *b*cos(d*x + c) + b^2)) - 2*(24*a^9*b^4 - 170*a^7*b^6 + 313*a^5*b^8 - 227* a^3*b^10 + 60*a*b^12 - 3*(a^13 - 4*a^11*b^2 + 6*a^9*b^4 - 4*a^7*b^6 + a^5* b^8)*cos(d*x + c)^4 + 15*(a^12*b - 4*a^10*b^3 + 6*a^8*b^5 - 4*a^6*b^7 + a^ 4*b^9)*cos(d*x + c)^3 + (63*a^11*b^2 - 342*a^9*b^4 + 590*a^7*b^6 - 421*a^5 *b^8 + 110*a^3*b^10)*cos(d*x + c)^2 + 3*(23*a^10*b^3 - 146*a^8*b^5 + 263*a ^6*b^7 - 190*a^4*b^9 + 50*a^2*b^11)*cos(d*x + c))*sin(d*x + c))/((a^17 - 4 *a^15*b^2 + 6*a^13*b^4 - 4*a^11*b^6 + a^9*b^8)*d*cos(d*x + c)^3 + 3*(a^16* b - 4*a^14*b^3 + 6*a^12*b^5 - 4*a^10*b^7 + a^8*b^9)*d*cos(d*x + c)^2 + 3*( a^15*b^2 - 4*a^13*b^4 + 6*a^11*b^6 - 4*a^9*b^8 + a^7*b^10)*d*cos(d*x + ...
\[ \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx=\int \frac {\cos ^{2}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{4}}\, dx \]
Exception generated. \[ \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.37 (sec) , antiderivative size = 615, normalized size of antiderivative = 1.59 \[ \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx=\frac {\frac {6 \, {\left (40 \, a^{6} b^{3} - 84 \, a^{4} b^{5} + 69 \, a^{2} b^{7} - 20 \, b^{9}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{12} - 3 \, a^{10} b^{2} + 3 \, a^{8} b^{4} - a^{6} b^{6}\right )} \sqrt {-a^{2} + b^{2}}} - \frac {2 \, {\left (90 \, a^{6} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 162 \, a^{5} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 48 \, a^{4} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 213 \, a^{3} b^{7} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 48 \, a^{2} b^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 81 \, a b^{9} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 36 \, b^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 180 \, a^{6} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 392 \, a^{4} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 284 \, a^{2} b^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 72 \, b^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 90 \, a^{6} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 162 \, a^{5} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 48 \, a^{4} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 213 \, a^{3} b^{7} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 48 \, a^{2} b^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 81 \, a b^{9} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, b^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (a^{11} - 3 \, a^{9} b^{2} + 3 \, a^{7} b^{4} - a^{5} b^{6}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )}^{3}} + \frac {3 \, {\left (a^{2} + 20 \, b^{2}\right )} {\left (d x + c\right )}}{a^{6}} - \frac {6 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 8 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{5}}}{6 \, d} \]
1/6*(6*(40*a^6*b^3 - 84*a^4*b^5 + 69*a^2*b^7 - 20*b^9)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*d*x + 1/2*c) - b*tan(1/2 *d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^12 - 3*a^10*b^2 + 3*a^8*b^4 - a^6*b^ 6)*sqrt(-a^2 + b^2)) - 2*(90*a^6*b^4*tan(1/2*d*x + 1/2*c)^5 - 162*a^5*b^5* tan(1/2*d*x + 1/2*c)^5 - 48*a^4*b^6*tan(1/2*d*x + 1/2*c)^5 + 213*a^3*b^7*t an(1/2*d*x + 1/2*c)^5 - 48*a^2*b^8*tan(1/2*d*x + 1/2*c)^5 - 81*a*b^9*tan(1 /2*d*x + 1/2*c)^5 + 36*b^10*tan(1/2*d*x + 1/2*c)^5 - 180*a^6*b^4*tan(1/2*d *x + 1/2*c)^3 + 392*a^4*b^6*tan(1/2*d*x + 1/2*c)^3 - 284*a^2*b^8*tan(1/2*d *x + 1/2*c)^3 + 72*b^10*tan(1/2*d*x + 1/2*c)^3 + 90*a^6*b^4*tan(1/2*d*x + 1/2*c) + 162*a^5*b^5*tan(1/2*d*x + 1/2*c) - 48*a^4*b^6*tan(1/2*d*x + 1/2*c ) - 213*a^3*b^7*tan(1/2*d*x + 1/2*c) - 48*a^2*b^8*tan(1/2*d*x + 1/2*c) + 8 1*a*b^9*tan(1/2*d*x + 1/2*c) + 36*b^10*tan(1/2*d*x + 1/2*c))/((a^11 - 3*a^ 9*b^2 + 3*a^7*b^4 - a^5*b^6)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1 /2*c)^2 - a - b)^3) + 3*(a^2 + 20*b^2)*(d*x + c)/a^6 - 6*(a*tan(1/2*d*x + 1/2*c)^3 + 8*b*tan(1/2*d*x + 1/2*c)^3 - a*tan(1/2*d*x + 1/2*c) + 8*b*tan(1 /2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 + 1)^2*a^5))/d
Time = 23.03 (sec) , antiderivative size = 8133, normalized size of antiderivative = 21.02 \[ \int \frac {\cos ^2(c+d x)}{(a+b \sec (c+d x))^4} \, dx=\text {Too large to display} \]
((tan(c/2 + (d*x)/2)^9*(7*a^7*b - 10*a*b^7 + a^8 + 20*b^8 - 59*a^2*b^6 + 2 7*a^3*b^5 + 57*a^4*b^4 - 21*a^5*b^3 - 11*a^6*b^2))/(a^5*(a + b)^3*(a - b)) + (2*tan(c/2 + (d*x)/2)^3*(30*a*b^8 + 21*a^8*b - 6*a^9 + 120*b^9 - 364*a^ 2*b^7 - 71*a^3*b^6 + 369*a^4*b^5 + 45*a^5*b^4 - 111*a^6*b^3 - 3*a^7*b^2))/ (3*a^5*(a + b)^2*(a - b)^3) - (2*tan(c/2 + (d*x)/2)^7*(21*a^8*b - 30*a*b^8 + 6*a^9 + 120*b^9 - 364*a^2*b^7 + 71*a^3*b^6 + 369*a^4*b^5 - 45*a^5*b^4 - 111*a^6*b^3 + 3*a^7*b^2))/(3*a^5*(a + b)^3*(a - b)^2) + (2*tan(c/2 + (d*x )/2)^5*(9*a^10 + 180*b^10 - 611*a^2*b^8 + 740*a^4*b^6 - 324*a^6*b^4 + 36*a ^8*b^2))/(3*a^5*(a + b)^3*(a - b)^3) + (tan(c/2 + (d*x)/2)*(10*a*b^7 - 7*a ^7*b + a^8 + 20*b^8 - 59*a^2*b^6 - 27*a^3*b^5 + 57*a^4*b^4 + 21*a^5*b^3 - 11*a^6*b^2))/(a^5*(a + b)*(a - b)^3))/(d*(tan(c/2 + (d*x)/2)^2*(9*a*b^2 + 3*a^2*b - a^3 + 5*b^3) + tan(c/2 + (d*x)/2)^4*(6*a*b^2 - 6*a^2*b - 2*a^3 + 10*b^3) - tan(c/2 + (d*x)/2)^6*(6*a*b^2 + 6*a^2*b - 2*a^3 - 10*b^3) + 3*a *b^2 + 3*a^2*b + a^3 + b^3 - tan(c/2 + (d*x)/2)^10*(3*a*b^2 - 3*a^2*b + a^ 3 - b^3) + tan(c/2 + (d*x)/2)^8*(3*a^2*b - 9*a*b^2 + a^3 + 5*b^3))) - (ata n(((((((4*(4*a^27 - 80*a^12*b^15 + 40*a^13*b^14 + 516*a^14*b^13 - 248*a^15 *b^12 - 1404*a^16*b^11 + 640*a^17*b^10 + 2076*a^18*b^9 - 896*a^19*b^8 - 17 64*a^20*b^7 + 724*a^21*b^6 + 816*a^22*b^5 - 316*a^23*b^4 - 160*a^24*b^3 + 52*a^25*b^2))/(a^25*b + a^26 - a^15*b^11 - a^16*b^10 + 5*a^17*b^9 + 5*a^18 *b^8 - 10*a^19*b^7 - 10*a^20*b^6 + 10*a^21*b^5 + 10*a^22*b^4 - 5*a^23*b...